package com.am.util;

import com.am.entity.Canvas;

/**
 * 用户是否有权限在当前画布作画
 */
public class DrawingPermission {
    /**
     * 有权限返回true
     * 相反返回false
     * @param canvas
     * @param uid
     * @param canvasName
     * @return
     */
    public static boolean drawing(Canvas canvas,String uid,String canvasName){
        if (canvas.getChmod() || uid.equals(canvasName.substring(0,canvasName.indexOf("_")))){
            return true;
        }
        return false;
    }
}
